
package cn.rengy.tool.excel;

import java.util.List;

public class CellObject {


    private String text;//列的值

    //字段名，从数据库查询的结果集的字段名，表头和字段名可以一致
    //当表头是中文时，表格数据依据字段名从map对象中获取数据
    private String columnName;

    private int rowNum;//行数

    private int halfHeight;

    private List<String> imageList;

    private CellStyleObject cellStyleObject;

    public String getColumnName() {
        if(columnName==null){
            columnName=getText();
        }
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getText() {
        return text;
    }

    public CellObject setText(String text) {
        this.text = text;
        return this;
    }

     CellObject(CellStyleObject cellStyleObject){
        this.cellStyleObject=cellStyleObject;
    }

    public static CellObject instance(CellStyleObject cellStyleObject){
        return new CellObject(cellStyleObject);
    }



    public int getRowNum() {
        return rowNum;
    }

    public void setRowNum(int rowNum) {
        this.rowNum = rowNum;
    }

    public int getHalfHeight() {
        return halfHeight;
    }

    public void setHalfHeight(int halfHeight) {
        this.halfHeight = halfHeight;
    }

    public List<String> getImageList() {
        return imageList;
    }

    public void setImageList(List<String> imageList) {
        this.imageList = imageList;
    }

    public CellStyleObject getCellStyleObject() {
        return cellStyleObject;
    }

    public void setCellStyleObject(CellStyleObject cellStyleObject) {
        this.cellStyleObject = cellStyleObject;
    }
}
